-
Notifications
You must be signed in to change notification settings - Fork 1.1k
False lock-order-inversion reports for locks taken in a single thread #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Reported by |
Reported by |
Reported by |
Reported by
|
Reported by |
Reported by |
Reported by |
Reported by |
Reported by |
Reported by |
Reported by
|
Just got another offline complain about this. |
On Thu, Sep 17, 2015 at 1:35 AM, Dmitry Vyukov notifications@github.com
Why is it "false"? Won't suppressions work for this case?
|
Single thread either deadlocks or not. There is no "it did not deadlock now, but potentially can". Tsan does this extrapolation, and it is false. |
On Thu, Sep 17, 2015 at 9:22 AM, Dmitry Vyukov notifications@github.com
What if we have a thread pool that in a small test always schedules two I don't mind a flag that will ignore such reports. (I may not have time to implement it any time soon :(
|
Should we do the same for races? That is, if a thread accesses a variable twice we can print a bug report saying that what if these accesses will happen in different threads in future. Does not make sense to me. False positives kill trust and experience. |
On Thu, Sep 17, 2015 at 9:46 AM, Dmitry Vyukov notifications@github.com
|
That's the most popular complain about deadlock detector. More precise semantics: each subsequent edge in mutex cycle must on a different thread than the previous one. |
On Thu, Sep 17, 2015 at 9:55 AM, Dmitry Vyukov notifications@github.com
Go for it!
|
@dvyukov: Any progress on this? |
No progress. Still relevant. |
This issue is also triggered with file i/o in libgfortran. |
We have been seeing this on mozilla-central more than once now. I really think the deadlock detector should check if only a single thread is involved and not report in that case. |
@dvyukov Is there any progress on this one? We have such a finding in our code base and were very confused as to why a different lock order inside the same thread would be a potential deadlock. So I would also classify this as a "false positive". If you argue that you would want this finding to be able to detect such scenarios in test suites that actually don't run into that issue, I would say your test suite has test gaps -> you can't complain about a test suite not detecting issues if you did not test the functionality (e.g. does my thread pool work if I have more than just a single worker). At the end, the sanitizer is supposed to analyze a specific binary at hand. If that binary suffers from an issue, ideally find that and report it. If this binary does not suffer from the issue, nothing should be reported. |
no progress done/planned |
Originally reported on Google Code with ID 81
Reported by
glider@chromium.org
on 2014-10-09 09:25:52The text was updated successfully, but these errors were encountered: